package datatypes;

import java.util.NoSuchElementException;

public enum MCEntityIDs {
	
	
	/**
	 * Items
	 */
	ITEM_DROPPED	(1),
	EXPERIENCEORB	(2),
	
	/**
	 * Projectiles
	 */
	ARROW_SHOT		(10),
	SNOWBALL_THROWN	(11),
	GHAST_FIREBALL	(12),
	BLAZE_FIREBALL	(13),
	ENDERPEARL_THROWN	(14),
	EYEOFENDER_THROWN	(15),
	SPLASHPOTION_THROWN (16),
	BOTTLE_O_ENCHANTING_THROWN (17),
	
	
	/**
	 * Blocks
	 */
	TNT_PRIMED		(20),
	BLOCK_FALLING	(21),
	
	
	/**
	 * Vehicles
	 */
	MINECART		(40),
	BOAT			(41),
	
	
	/**
	 * Mobs
	 */
	CREEPER			(50),
	SKELETON		(51),
	SPIDER			(52),
	GIANTZOMBIE		(53),
	ZOMBIE			(54),
	SLIME			(55),
	GHAST			(56),
	ZOMBIEPIGMAN	(57),
	ENDERMAN		(58),
	CAVESPIDER		(59),
	SLIVERFISH		(60),
	BLAZE			(61),
	MAGMACUBE		(62),
	ENDERDRAGON		(63),
	
	PIG				(90),
	SHEEP			(91),
	COW				(92),
	CHICKEN			(93),
	SQUID			(94),
	WOLF			(95),
	MOOSHROOM		(96),
	SNOWMAN			(97),
	OCELOT			(98),
	
	VILLAGER		(120);
	
	
	
	private int typeid;
	
	MCEntityIDs(int typeid) {
		this.typeid = typeid;
	}
	
	
	public static MCEntityIDs getMob(int typeid) {
		for(MCEntityIDs mob : values()) {
			if(mob.typeid == typeid) {
				return mob;
			}
		}
		throw new NoSuchElementException();
	}
}
